/*
 * Powered By XY
 * Since 2020
 */

package com.xy.biz.ts.dao;

import java.util.Collection;
import java.util.List;

import com.xy.biz.ts.domain.po.ExaminationPaperQuestionPO;
import com.xy.biz.ts.domain.query.ExaminationPaperQuestionQuery;

/**
 *
 *
 * @author wcs
 * @date 2021-3-8
 */
public interface ExaminationPaperQuestionDao {

	/**
	 * 保存
	 *
	 * @param examinationPaperQuestionPO
	 */
	int saveExaminationPaperQuestion(ExaminationPaperQuestionPO examinationPaperQuestionPO);

	/**
	 * 保存多个
	 *
	 * @param collection
	 */
	int saveAllExaminationPaperQuestion(Collection<ExaminationPaperQuestionPO> collection);

	/**
	 * 更新
	 *
	 * @param examinationPaperQuestionPO
	 */
	int updateExaminationPaperQuestion(ExaminationPaperQuestionPO examinationPaperQuestionPO);

	/**
	 * 删除
	 *
	 * @param examinationPaperQuestionId
	 */
	int deleteExaminationPaperQuestion(Long examinationPaperQuestionId);

	/**
	 * 查找一个
	 *
	 * @param examinationPaperQuestionId
	 * @return
	 */
	List<ExaminationPaperQuestionPO> getExaminationPaperQuestion(Long examinationPaperQuestionId);

	/**
	 * 查找多条
	 *
	 * @param collection
	 * @return
	 */
	List<ExaminationPaperQuestionPO> listExaminationPaperQuestionById(Collection<Long> collection);

	/**
	 * 条件查找多条
	 *
	 * @param query 查找条件
	 * @return
	 */
	List<ExaminationPaperQuestionPO> listExaminationPaperQuestion(ExaminationPaperQuestionQuery query);

	/**
	 * 条件统计个数
	 *
	 * @param query 查找条件
	 * @return
	 */
	int countExaminationPaperQuestion(ExaminationPaperQuestionQuery query);

	/**
	 * 删除
	 * @param examinationPaperQuestionId
	 * @return
	 */
    int deleteQuestionExaminationPaper(Long examinationPaperQuestionId);

	/**
	 * 获得下一个sequence
	 * @return
	 */
	Integer getNextSequence();

	/**
	 * 删除试卷的同时删除所属全部试题
	 * @param
	 */
    void deleteExaminationPaperQuestionsByPaperId(Collection<Long> collection);

	int deleteExaminationPaperQuestionByExaminationPaperId(ExaminationPaperQuestionPO toPO);
}
